<script setup>
import {defineExpose, ref} from "vue";
import service from './service'

const formData = ref({
    userNum: "",
    userCode: "",
    userName: "",
    sex: "",
    email: "",
    entryDate: "",
    workPhone: "",
    mobile: "",
    identityType: "",
    identityNo: "",
    birthday: "",
    qq: "",
    weChat: "",
    weChatId: "",
    userStatus: "",
    employmentType: "",
    emergencyName: "",
    emergencyMobile: "",
    education: "",
    contractStartDate: "",
    contractEndDate: "",
})

const addData = () => service.add.addData(formData.value)

defineExpose({
    addData
})

</script>

<template>
    <el-input v-model="formData.userNum" style="width: 240px" placeholder="请输入用户编号"/>
    <el-input v-model="formData.userCode" style="width: 240px" placeholder="请输入用户编码"/>
    <el-input v-model="formData.userName" style="width: 240px" placeholder="请输入用户姓名"/>
    <el-input v-model="formData.sex" style="width: 240px" placeholder="请输入性别"/>
    <el-input v-model="formData.email" style="width: 240px" placeholder="请输入邮箱"/>
    <el-input v-model="formData.entryDate" style="width: 240px" placeholder="请输入入职日期"/>
    <el-input v-model="formData.workPhone" style="width: 240px" placeholder="请输入工作电话"/>
    <el-input v-model="formData.mobile" style="width: 240px" placeholder="请输入手机号"/>
    <el-input v-model="formData.identityType" style="width: 240px" placeholder="请输入证件类型"/>
    <el-input v-model="formData.identityNo" style="width: 240px" placeholder="请输入证件编号"/>
    <el-input v-model="formData.birthday" style="width: 240px" placeholder="请输入生日"/>
    <el-input v-model="formData.qq" style="width: 240px" placeholder="请输入QQ号"/>
    <el-input v-model="formData.weChat" style="width: 240px" placeholder="请输入微信号"/>
    <el-input v-model="formData.weChatId" style="width: 240px" placeholder="请输入微信唯一编码"/>
    <el-input v-model="formData.userStatus" style="width: 240px" placeholder="请输入人员状态"/>
    <el-input v-model="formData.employmentType" style="width: 240px" placeholder="请输入用工类型"/>
    <el-input v-model="formData.emergencyName" style="width: 240px" placeholder="请输入紧急联系人姓名"/>
    <el-input v-model="formData.emergencyMobile" style="width: 240px" placeholder="请输入紧急联系人电话"/>
    <el-input v-model="formData.education" style="width: 240px" placeholder="请输入学历"/>
    <el-input v-model="formData.contractStartDate" style="width: 240px" placeholder="请输入合同开始日期"/>
    <el-input v-model="formData.contractEndDate" style="width: 240px" placeholder="请输入合同结束日期"/>
</template>

<style scoped lang="scss">

</style>
